package oj.swing.component;

import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JDialog;

import oj.jboss.seContext.SContext;

public abstract class OjSwingDialog extends JDialog implements ActionListener {
	private String sUser;

	private String sPassword;

	private String sIdUser;

	private JDialog tab;

	private SContext context;

	public OjSwingDialog() throws Exception {

		this.getContentPane().setLayout(null);
		this.setSize(new Dimension(300, 300));
		this.setModal(true);
		this.setResizable(false);
		this.setLocationRelativeTo(null);
		setContext(new SContext());
		setTab(this);

	}

	public void actionPerformed(ActionEvent e) {

		eventAccionBoton(e.getActionCommand());

	}

	public abstract void eventAccionBoton(String boton);

	public String getSUser() {
		return sUser;
	}

	public void setSUser(String user) {
		sUser = user;
	}

	public String getSPassword() {
		return sPassword;
	}

	public void setSPassword(String password) {
		sPassword = password;
	}

	public String getSIdUser() {
		return sIdUser;
	}

	public void setSIdUser(String idUser) {
		sIdUser = idUser;
	}

	public JDialog getTab() {
		return tab;
	}

	public void setTab(JDialog tab) {
		this.tab = tab;
	}

	public SContext getContext() {
		return context;
	}

	public void setContext(SContext context) {
		this.context = context;
	}

}
